package com.yukefms.jointpoint;

/**
 * the tracked state for joint.
 */
public enum JointStatus {
    /*
    the joint is not tracked.
     */
    NotTracked(0),
    /*
    the joint was inferred by some interferences.
     */
    Inferred(1),
    /**
     * the joint was tracked successfully.
     */
    Tracked(2) ;

    private final int state ;
    JointStatus(int state) {
        this.state = state ;
    }
    @Override
    public String toString() {
        return "tracked_state: " + String.valueOf(this.state) ;
    }

    public static JointStatus toStatus(String v) {
        switch (v) {
            case "1":
                return JointStatus.Inferred ;
            case "2":
                return JointStatus.Tracked ;
            case "0":
                return JointStatus.NotTracked ;
            default:
                return NotTracked ;
        }

    }

}
